<template>
  <zizujian @getData="getDatas"></zizujian>
  <h1 v-if="sonData">接收到子组件的值：{{ sonData }}</h1>
  <ElButton>12345</ElButton>
  <ElColorPicker></ElColorPicker>
  {{ sonDatas }}
</template>
<script setup>
import zizujian from "./zi.vue";
import { ref, defineExpose, provide, inject } from "vue";
import { ElButton, ElColorPicker } from "element-plus";
const sonData = ref("");
function getDatas(data) {
  console.log(data, 7);
  sonData.value = data;
}
defineExpose({
  getDatas,
});
const sonDatas = inject("sonDatas");
provide("ZuDatas", "11");
</script>
